Lane line detection method and apparatus

ABSTRACT

The present disclosure provides a lane line detection method and apparatus. The lane line detection method is applicable for an in-vehicle device and includes: determining a region of interest in an image to be detected; extracting lane line pixel features in the region of interest; combining similar lane line pixel features to generate a superpixel corresponding to the combined lane line pixel features; and performing a clustering and fitting process for respective superpixels to obtain a target lane line.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from Chinese patent application No.201810805059.6 filed with the China National Intellectual PropertyAdministration on Jul. 20, 2018, the disclosure of which is incorporatedherein by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the field of intelligenttransportation, and particularly relates to a lane line detection methodand apparatus.

BACKGROUND

With the rapid development of vehicle assisted driving and unmannedvehicle technology, whether a machine vision sensor can accuratelyobtain signs, marks or lane line information around the vehicle becomesthe most important part of an vehicle assisted driving system in which areal-time detection and warning technology of the lane line guaranteesthat various vehicles run on their own lanes, and plays an importantrole in deviation warning and lane keeping.

Current lane line detection methods mainly depends on an assumption thatthe lane lines are parallel, or the lane line or road model is requiredto be known in advance. These methods perform well on highways, but inan urban environment, for example, in case of intersecting, branched,merged lane lines or the like, these methods tend to miss detection.Moreover, when a vehicle in front comes too close, it will also causeinterference with the lane line detection of the current lane, resultingin false detection of the lane line.

SUMMARY

The present disclosure has been accomplished in order to solve at leastpart of the problems in the related art. The present disclosure providesa lane line detection method and apparatus.

According to an aspect of the present disclosure, there is provided alane line detection method applicable for an in-vehicle device andincluding:

determining a region of interest in an image to be detected;

extracting lane line pixel features in the region of interest;

combining similar lane line pixel features to generate a superpixelcorresponding to the combined lane line pixel features; and

performing a clustering and fitting process for respective superpixelsto obtain a target lane line.

In some embodiments, the step of determining the region of interest inthe image to be detected includes:

setting a lane line processing region around the in-vehicle device;

determining coordinate values of a midpoint on each of boundary lines ofthe lane line processing region in a real coordinate system in which thein-vehicle device is located;

converting each of the coordinate values into a corresponding imagecoordinate value in an image coordinate system corresponding to theimage to be detected; and

determining the region of interest in the image to be detected accordingto the respective image coordinate values.

In some embodiments, the step of extracting the lane line pixel featuresin the region of interest includes:

selecting a first edge image and a second edge image in the region ofinterest;

performing a binarization process for each of the first edge image andthe second edge image to obtain a first binarized edge image and asecond binarized edge image; and

perform a row scanning for each of the first binarized edge image andthe second binarized edge image, and obtaining a first lane line pixelfeature point and a second lane line pixel feature point in respectiverows.

In some embodiments, the step of combining the similar lane line pixelfeatures to generate the superpixel corresponding to the combined laneline pixel features includes:

copying and saving the first lane line pixel feature point and thesecond lane line pixel feature point into a new image to obtain a laneline feature map when a distance between the first lane line pixelfeature point and the second lane line pixel feature point satisfies aset distance threshold;

searching for a superpixel feature from an edge position of the laneline feature map, and using a first found superpixel feature as asuperpixel feature reference point;

finding similar features to the superpixel feature reference pointwithin a candidate range of the superpixel feature reference point; and

combining the superpixel feature reference point with the found similarfeatures to generate the superpixel.

In some embodiments, the step of performing the clustering and fittingprocess for the respective superpixels to obtain the target lane lineincludes:

performing a clustering process for the respective superpixels to obtaina plurality of candidate lane lines;

calculating a length value of each of the candidate lane lines; and

performing a quadratic curve fitting for each of the candidate lanelines whose length value is greater than a set threshold to obtain atarget lane line.

In some embodiments, the binarization process includes comparing pixelvalues of the first edge image and the second edge image to a pixelthreshold which is associated with positions of the pixels in the firstedge image and the second edge image.

In some embodiments, the pixel threshold is also associated with avertical gradient of the pixels in the first edge image and the secondedge image.

In some embodiments, it is determined whether a distance value betweenthe matched first and second lane line pixel feature points is between afirst threshold and a second threshold that are associated withpositions of the first lane line pixel feature point and the second laneline pixel feature point.

In some embodiments, the following sample distance metric formula isdefined to perform the clustering and fitting process:

d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) ·u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) ·u−b _(j)·u),

where d(u_(i), u_(j)) represents a distance between superpixels u_(i)and u_(j), θ_(ti) represents a gradient direction angle of a top pixelpoint ti of the superpixel u_(i), θ_(mi) represents a gradient directionangle of a middle pixel point mi of the superpixel u_(i), θ_(bi)represents a gradient direction angle of a bottom pixel point bi of thesuperpixel u_(i), θ_(tj) represents a gradient direction angle of a toppixel point tj of the superpixel u_(j), θ_(mj) represents a gradientdirection angle of a middle pixel point mj of the superpixel u_(j),θ_(bj) represents a gradient direction angle of a bottom pixel point bjof the superpixel u_(j), α represents the weight of angle, β representsthe weight of distance, α and β represent a preset fixed value, absrepresents calculating an absolute value, t_(i)·u represents an abscissaof the top pixel point ti, m_(i)·u represents an abscissa of the middlepixel point mi, b_(i)·u represents an abscissa of the bottom pixel pointbi, t_(j)·u represents an abscissa of the top pixel point tj, m_(j)·urepresents an abscissa of the middle pixel point mj, and b_(i)·urepresents an abscissa of the bottom pixel point bj.

According to another aspect of the disclosure, there is provided a laneline detection apparatus, including:

a region of interest determining component configured to determine aregion of interest in an image to be detected;

a pixel feature extracting component configured to extract lane linepixel features in the region of interest;

a superpixel generating component configured to combine similar laneline pixel features to generate a superpixel corresponding to thecombined lane line pixel features; and

a target lane line obtaining component configured to perform aclustering and fitting process for respective superpixels to obtain atarget lane line.

In some embodiments, the region of interest determining componentincludes:

a processing region setting sub-component configured to set a lane lineprocessing region around the in-vehicle device;

a coordinate value determining sub-component configured to determinecoordinate values of a midpoint on each of boundary lines of the laneline processing region in a real coordinate system in which thein-vehicle device is located;

an image coordinate value obtaining sub-component configured to converteach of the coordinate values into a corresponding image coordinatevalue in an image coordinate system corresponding to the image to bedetected; and

a region of interest determining sub-component configured to determinethe region of interest in the image to be detected according to therespective image coordinate values.

In some embodiments, the pixel feature extracting component includes:

an edge image selecting sub-component configured to select a first edgeimage and a second edge image in the region of interest;

a binarization processing sub-component configured to perform abinarization process for each of the first edge image and the secondedge image to obtain a first binarized edge image and a second binarizededge image; and

a scan processing sub-component configured to perform a row scanning foreach of the first binarized edge image and the second binarized edgeimage, and obtain a first lane line pixel feature point and a secondlane line pixel feature point in respective rows.

In some embodiments, the superpixel generating component includes:

a lane line feature map obtaining sub-component configured to copy andsave the first lane line pixel feature point and the second lane linepixel feature point into a new image to obtain a lane line feature mapwhen a distance between the first lane line pixel feature point and thesecond lane line pixel feature point satisfies a set distance threshold;

a reference point selecting sub-component configured to search for asuperpixel feature from an edge position of the lane line feature map,and use a first found superpixel feature as a superpixel featurereference point;

a finding sub-component configured to find similar features to thesuperpixel feature reference point within a candidate range of thesuperpixel feature reference point; and

a superpixel generating sub-component configured to combine thesuperpixel feature reference point with the found similar features togenerate the superpixel.

In some embodiments, the target lane line obtaining component includes:

a clustering and fitting processing sub-component configured to performa clustering process for the superpixels to obtain a plurality ofcandidate lane lines;

a length value calculating sub-component configured to calculate alength value of each of the candidate lane lines; and

a target lane line obtaining sub-component configured to perform aquadratic curve fitting for each of the candidate lane lines whoselength value is greater than a set threshold to obtain a target laneline.

In some embodiments, the binarization processing sub-component isconfigured to compare pixel values of the first edge image and thesecond edge image to a pixel threshold which is associated withpositions of the pixels in the first edge image and the second edgeimage.

In some embodiments, the lane line feature map obtaining sub-componentis configured to determine whether a distance value between the matchedfirst and second lane line pixel feature points is between a firstthreshold and a second threshold that are associated with positions ofthe first lane line pixel feature point and the second lane line pixelfeature point.

In some embodiments, the clustering and fitting processing sub-componentdefines the following sample distance metric formula to perform theclustering and fitting process:

d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) ·u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) ·u−b _(j)·u),

where d(u_(i), u_(j)) represents a distance between superpixels u_(i)and u_(j), θ_(ti) represents a gradient direction angle of a top pixelpoint ti of the superpixel u_(i), θ_(mi) represents a gradient directionangle of a middle pixel point mi of the superpixel u_(i), θ_(bi)represents a gradient direction angle of a bottom pixel point bi of thesuperpixel u_(i), θ_(tj) represents a gradient direction angle of a toppixel point tj of the superpixel u_(j), θ_(mj) represents a gradientdirection angle of a middle pixel point mj of the superpixel θ_(bi)represents a gradient direction angle of a bottom pixel point bj of thesuperpixel u_(j), α represents the weight of angle, β represents theweight of distance, α and β represent a preset fixed value, absrepresents calculating an absolute value, t_(i)·u represents an abscissaof the top pixel point ti, m_(i)·u represents an abscissa of the middlepixel point mi, b_(i)·u represents an abscissa of the bottom pixel pointbi, t_(j)·u represents an abscissa of the top pixel point tj, m_(j)·urepresents an abscissa of the middle pixel point mj, and b_(j)·urepresents an abscissa of the bottom pixel point bj.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flowchart showing steps of a lane line detection methodaccording to an exemplary embodiment of the present disclosure;

FIG. 2 is a flowchart showing specific steps of a lane line detectionmethod according to an exemplary embodiment of the present disclosure;

FIG. 3a is a schematic view showing settings of a lane line processingregion according to an exemplary embodiment of the present disclosure;

FIG. 3b is a schematic view showing a lane line according to anexemplary embodiment of the present disclosure;

FIG. 3c is a schematic view showing the searching of a superpixelaccording to an exemplary embodiment of the present disclosure;

FIG. 3d is a schematic view showing a superpixel gradient directionaccording to an exemplary embodiment of the present disclosure; and

FIG. 4 is a structural schematic view showing a lane line detectionapparatus according to an exemplary embodiment of the disclosure.

DETAILED DESCRIPTION

To improve understanding of the above objects, features and advantages,the present disclosure will now be described in detail in conjunctionwith accompanying drawings and specific embodiments.

FIG. 1 is a flowchart showing steps of a lane line detection methodaccording to an exemplary embodiment of the present disclosure. As shownin FIG. 1, the lane line detection method may be applicable for anin-vehicle device, and may include the following steps:

Step 101: determining a region of interest in an image to be detected;The lane line detection method provided in an exemplary embodiment ofthe present disclosure may be applicable for real-time detection of alane line in front of the in-vehicle device. The in-vehicle device maybe a device installed at the front of the vehicle integratingphotographing, analysis, or other functions; the specific devices arenot limited herein.

The in-vehicle device may include an image capturing means, such as acamera, disposed at a vehicle head so that road conditions in theforward, left and right directions of the in-vehicle device arephotographed in real time during running of the vehicle for subsequentreal-time analysis of the lane line.

A Region of Interest (ROI) is an image region selected from an imageserving as the focus of subsequent image analysis. The region isdelineated for further processing. That is, the region of interestmentioned in the exemplary embodiment of the present disclosure is aregion in an image to be detected that needs to be subjected tosubsequent processing. By providing the region of interest, a processingtime of image analysis can be reduced, and the analysis accuracy isincreased.

The region of interest in the image to be detected may be obtained bysetting a distance threshold. The manner of setting the region ofinterest in the image to be detected will be described in detail below,and will not be repeated in this exemplary embodiment of the presentdisclosure herein.

After the region of interest in the image to be detected is determined,step 102 is performed.

Step 102: extracting lane line pixel features in the region of interest.

After the region of interest in the image to be detected is determined,a lane line pixel feature may be extracted from the region of interest.For a certain row in the region of interest in the image to be detected,the lane line pixel feature is determined by a plurality of paired edgefeature points, and for any lane line (such as curves, lines, doubleyellow lines, double white lines, etc.), the captured images all haveedges and may be detectable through the paired edge feature points.

In an exemplary embodiment of the present disclosure, a directed edgeextraction operator and a dual threshold binarization method includingan adaptive threshold may be used to preprocess the region of interestin the image to be detected, so as to extract the lane line pixelfeature. The specific process will be described in below and will not berepeated in this exemplary embodiment of the present disclosure herein.

After the lane line pixel feature in the region of interest isextracted, step 103 is performed.

Step 103: combining similar lane line pixel features to generate asuperpixel corresponding to the combined lane line pixel features.

Superpixel refers to dividing an originally pixel-level image into adistrict-level image, and in an exemplary embodiment of the presentdisclosure, refers to combining a plurality of similar lane line pixelfeatures as a superpixel for subsequent processing.

After the lane line pixel feature from the region of interest isextracted, similar lane line pixel features may be combined to generatea superpixel corresponding to the combined lane line pixel features. Forexample, the extracted lane line pixel features include A, B, C, D, E,F, G, H, I, J and K, where A, B, I, J and K are similar lane line pixelfeatures, C, D, E and F are similar lane line pixel features, and G andH are similar lane line pixel features. Then, A, B, I, J and K arecombined, C, D, E and F are combined, and G and H are combined,resulting in a superpixel corresponding to A, B, I, J and K, asuperpixel corresponding to C, D, E and F, and a superpixelcorresponding to G and H.

It is to be understood that the above examples are merely examples forbetter understanding of the aspects of the exemplary embodiments of thepresent disclosure, and are not intended to limit the presentdisclosure.

The specific process of combining similar lane line pixel features togenerate a superpixel corresponding to the combined lane line pixelfeatures will be described in detail below, and will not be repeated inthis exemplary embodiment of the present disclosure herein.

After the superpixel corresponding to the combined lane line pixelfeatures is generated, step 104 is performed.

Step 104: performing a clustering and fitting process for respectivesuperpixels to obtain a target lane line.

After at least one superpixel is obtained, a clustering and fittingprocess may be performed for each superpixel by using a presetclustering method to obtain a target lane line.

The image to be detected adopted in the exemplary embodiment of thepresent disclosure is an original image directly captured by aphotographing means. Subsequent analysis of the image is performed basedon the original image, all lane line pixels are detected, and adifference between two adjacent frames of image data in the image to bedetected is relatively small. Thus, no visual jitter is generated.

The lane line detection method provided in the exemplary embodiment ofthe present disclosure may be applicable for an in-vehicle device, andmay determine a region of interest in an image to be detected, extracteach lane line pixel feature in the region of interest, combine similarlane line pixel features to generate a superpixel corresponding to thecombined lane line pixel features, and perform a clustering and fittingprocess for each superpixel to obtain a target lane line. The exemplaryembodiment of the present disclosure generates the target lane linebased on superpixels, which does not require any assumption about laneline and road models, and does not rely on the assumption of parallellane lines; it may work robustly in an urban environment withoutinterference with a front vehicle, thereby reducing a probability ofmissed or false detection during the lane line detection.

FIG. 2 is a flowchart showing specific steps of a lane line detectionmethod according to an exemplary embodiment of the present disclosure.As shown in FIG. 2, the lane line detection method may be applicable foran in-vehicle device, and may specifically include the following steps:

Step 201: setting a lane line processing region around the in-vehicledevice.

In an exemplary embodiment of the present disclosure, a lane lineprocessing region may be set around the in-vehicle device in advance.For example, referring to FIG. 3a , a schematic view showing settings ofthe lane line processing region according to an exemplary embodiment ofthe present disclosure is shown. As shown in FIG. 3a , the in-vehicledevice is located at a bottom edge in FIG. 3a . With the in-vehicledevice as a central coordinate, a front-rear direction of the in-vehicledevice is set to be the Y-axis, a left-right direction thereof is set tobe the X-axis, and a region 3 m-40 m away from the X-axis in front ofthe in-vehicle device (3 m is the determined closest detection distancein front of the in-vehicle device, and 40 m is the determined furthestdetection distance in front of the vehicle equipment), and −7 m˜7 m awayfrom the Y-axis in the left-right direction of the in-vehicle device isset to be the lane line processing region, etc. The above four distanceparameters may be used to determine the real detection range, that is,the lane line processing region. It can be understood that the abovefour distance parameters are exemplarily enumerated for illustrativepurposes only, and those skilled in the art may arbitrarily set thesedistance parameters as needed. It is also to be understood that theabove examples are merely examples for better understanding of thetechnical solutions of the present disclosure, and are not intended tolimit the present disclosure.

The lane line processing region may be set by the system, and thespecific setting process is not described in detail herein.

After the lane line processing region is set around the in-vehicledevice, step 202 is performed.

Step 202: determining coordinate values of a midpoint on each ofboundary lines of the lane line processing region in a real coordinatesystem in which the in-vehicle device is located.

The lane line processing region is preferably a rectangular region, thatis, with the in-vehicle device as a central coordinate, the front-reardirection of the in-vehicle device is set to the Y-axis, the left-rightdirection thereof is set to be the X-axis, and a region formed with afirst set distance value away from the X-axis and a second set distancevalue away from the Y-axis is set to be the lane line processing region.

After the lane line processing region is determined, a midpoint of eachboundary line of the lane line processing region may be obtained, andcoordinate values of the midpoint in the world coordinate system inwhich the in-vehicle device is located are determined.

After the coordinate values of the midpoint of each boundary line of thelane line processing region in the real coordinate system where thein-vehicle device is located is determined, step 203 is performed.

Step 203: converting each of the coordinate values into a correspondingimage coordinate value in an image coordinate system corresponding tothe image to be detected.

After the coordinate values of the midpoint of each boundary line of thelane line processing region in the real coordinate system where thein-vehicle device is located is determined, each of the coordinatevalues in the real coordinate system may be converted into the imagecoordinate system corresponding to the image to be detected so that eachimage coordinate value corresponding to the respective coordinate valuesare obtained.

Specifically, the coordinate value may be converted through thefollowing formula (1):

$\begin{matrix}{\begin{bmatrix}u \\v \\1\end{bmatrix} = {{{k\begin{bmatrix}{f\; u} & 0 & {u\; 0} \\0 & {f\; v} & {v\; 0} \\0 & 0 & 1\end{bmatrix}}\begin{bmatrix}R & T \\0 & 1\end{bmatrix}}\begin{bmatrix}X \\Y \\Z \\1\end{bmatrix}}} & (1)\end{matrix}$

where f_(u) and f_(v) represent focal lengths of a sensor in directionsu and v, respectively, u and v represent the abscissa and the ordinateof the image coordinate system, respectively, u0 and v0 representoptical center coordinates of the sensor, i.e., coordinates of a centerpoint of the image to be detected, respectively, and R and T are setvalues obtained by parameter calibrations outside the camera.

It can be understood that X, Y, and Z in the above formula arecoordinate values of a certain point in the world coordinate system, andR and T represent a rotation matrix and a translation matrix between theworld coordinate system and the camera coordinate system, respectively.

By means of the above formula (1), the coordinate values of the midpointof each boundary line of the lane line processing region in the realcoordinate system where the in-vehicle device is located may beconverted into the image coordinate system in which the image to bedetected is located, and then the image coordinate values correspondingto the respective real coordinate values are obtained.

Generally in the art, in an image coordinate system, a pointcorresponding to an upper left corner of the image is taken as theorigin of the image coordinate system. In an exemplary embodiment of thepresent disclosure, a point corresponding to the upper left corner ofthe image to be detected is taken as the origin of the image coordinatesystem.

After each image coordinate value is obtained, step 204 is performed.

Step 204: determining the region of interest in the image to be detectedaccording to the respective image coordinate values.

A Region of Interest (ROI) is an image region selected from an imageserving as the focus of subsequent image analysis. The region isdelineated for further processing. That is, the region of interestmentioned in the exemplary embodiment of the present disclosure is aregion in an image to be detected that needs to be subjected tosubsequent processing. By providing the region of interest, a processingtime of image analysis can be reduced, and the analysis accuracy isincreased.

After the coordinate values of the lane line processing region in thereal coordinate system in which the in-vehicle device is located areconverted to the image coordinate system in which the image to bedetected is located, and the image coordinate values corresponding tothe respective coordinate values are obtained, the region to beprocessed of the image to be detected, i.e., the region of interest inthe image to be detected, may be determined according to the imagecoordinate values. For example, the image coordinate values at left(i.e., left of the in-vehicle device), right (i.e., right of thein-vehicle device), top (i.e., a furthest position in front of thein-vehicle device) and bottom (i.e., a closest position in front of thein-vehicle device) sides of the region to be processed in the image tobe detected are obtained. Thus, the region of interest in the image tobe detected may be determined according to the above four imagecoordinate values.

In order to reduce interference from the complex surrounding environmentwith the lane line detection and improve the processing speed, aconventional method is to set a fixed region of interest before thefeature extraction step, after which all the processing is performedonly for the region of interest. This method requires constant debuggingto get better parameters of the region of interest. Moreover, each timewhen a sensor for capturing an image is replaced, the parameters of theregion of interest are required to be adjusted as the position of thelane line in different sensors is variable. In order to avoid suchinconvenience, the method provided by the present disclosure sets theprocessing region to be a region 3 m-40 m in front and −7 m˜7 m in theleft-right direction of the vehicle, and the region of interest in theimage may be automatically calculated by using the above steps. It issimple and time-saving to determine the region of interest using themethod provided by the present disclosure.

After the region of interest in the image to be detected is determined,step 205 is performed.

It should be understood that the above steps 201 to 204 correspond tothe step 101 described above, that is, the above steps 201 to 204 aresubdivided steps of the step 101.

Step 205: selecting a first edge image and a second edge image in theregion of interest.

In an exemplary embodiment of the present disclosure, a left filter anda right filter may be used to detect edges of regions of interest atleft and right sides of the in-vehicle device, and obtain a left edgeimage and a right edge image, i.e., the first edge image and the secondedge image.

The eigenvalues of the two filters may be expressed by the followingformulas (2) and (3), respectively:

$\begin{matrix}{{{fl}( {u,v} )} = {{\sum\limits_{i = 0}^{i = {{wf}/2}}{f( {u + i} )}} - {\sum\limits_{i = 0}^{i = {{wf}/2}}{f( {u - i} )}}}} & (2) \\{{{fr}( {u,v} )} = {{- {\sum\limits_{i = 0}^{i = {{wf}/2}}{f( {u + i} )}}} + {\sum\limits_{i = 0}^{i = {{wf}/2}}{f( {u - i} )}}}} & (3)\end{matrix}$

Where fl(u,v) represents an eigenvalue of the left filter, fr(u,v)represents an eigenvalue of the right filter, (u,v) represents acoordinate point with the in-vehicle device as the origin and theright/right direction of the in-vehicle device as the X-axis, wf/2represents width parameters of the left/right filter, which can be setto be a set value.

The eigenvalue of the left/right filter may be expressed by the aboveformulas (2) and (3) respectively to filter the region of interest andthus obtain two edge images (i.e., the first edge image and the secondedge image), and then obtain the lane line feature through the two edgeimages.

After the first edge image and the second edge image are selected, step206 is performed.

Step 206: performing a binarization process for each of the first edgeimage and the second edge image to obtain a first binarized edge imageand a second binarized edge image.

In an exemplary embodiment of the present disclosure, after the firstedge image and the second edge image are obtained, the first edge imageand the second edge image may be separately binarized to obtain a firstbinarized edge image corresponding to the first edge image and a secondbinarized edge image corresponding to the second edge image.

Specifically, the binarization process may be expressed by the followingformulas (4) and (5):

$\begin{matrix}{{I_{l}^{\prime}( {u,v} )} = \{ \begin{matrix}{{I_{l}( {u,v} )},} & {{{ifI}_{l}( {u,v} )} > T_{l}} \\{0,} & {otherwise}\end{matrix} } & (4) \\{{I_{r}^{\prime}( {u,v} )} = \{ \begin{matrix}{{I_{r}( {u,v} )},} & {{{ifI}_{r}( {u,v} )} > T_{r}} \\{0,} & {otherwise}\end{matrix} } & (5)\end{matrix}$

Where I_(l)(u,v) and I_(r)(u,v) represent the pixel value of the firstbinarized edge image and the pixel value of the second binarized edgeimage, respectively, T_(l) and T_(r) represent the pixel thresholds ofthe first edge image and the second edge image, respectively, and T_(l)and T_(r) are not only related to a brightness value of the currentpixel neighborhood, but also determined in combination with a verticalgradient of the pixels. That is, for a lane line, it has a largerhorizontal gradient and a smaller vertical gradient, while for aninterference factor, e.g., a vehicle or a rail, it has a larger verticalgradient. Therefore, by means of the gradient information, the presentdisclosure can better filter out interference caused by other factors.It should be understood that the binarization process herein isdifferent from the conventional method of simply dividing a pixel valueinto only 0 and 255, but instead, dividing the pixel value into 0 and aplurality of values determined by the image pixel values and the setpixel thresholds.

Each pixel in the image corresponds to a threshold, and each pixelcorresponds to a different threshold. For the first edge image and thesecond edge image, each pixel is compared with the correspondingthreshold to generate a new first binarized edge image and a new secondbinarized edge image.

In this step, the binarization process includes comparing the pixelvalues of the first edge image and the second edge image to a pixelthreshold which is associated with positions, vertical gradients, andbrightness values of the neighborhood of the pixels in the first edgeimage and the second edge image.

For example, suppose the current pixel position is (u, v) and its pixelvalue is data(u, v), then the current pixel gradient is calculated asfollows:

Δgrad=min(abs(data(u,v−width)−data(u,v)),abs(data(u−1,v−width)−data(u,v)),abs(data(u+1,v−width−data(u,v)))  (6)

In the above formula (6), data(u,v) represents the pixel value of thepoint (u,v) in the image, and abs indicates calculating the absolutevalue. Minimum values of three gradients may be obtained by the aboveformula (6), the three gradients are: a gradient absolute value of thecurrent pixel and an upper left adjacent pixel, a gradient absolutevalue of the current pixel and an upper adjacent pixel, and a gradientabsolute value of the current pixel and an upper right adjacent pixel.In the exemplary embodiment of the present disclosure, the absolutevalue is added because the gradient between the current pixel and theadjacent pixel is independent of positive and negative, but only relatedto the gradient absolute value.

In an exemplary embodiment of the present disclosure, the verticalgradient may be obtained by only calculating one side of the image (forexample, above the pixel, or below the pixel, etc.).

Calculation for gradient threshold T_(grad) of the current pixel: withthe current pixel as a center, search for a gradient Δgrad of 16 pixels(calculated by the above formula (6)) on both left and right sides, andselect the maximum gradient as the gradient threshold of the currentpixel.

$\begin{matrix}{T_{l} = {\max( {\frac{\sum\limits_{i = {x - {w/2}}}^{x}{i( {i,y} )}}{w/2},T_{grad}} )}} & (7) \\{T_{r} = {\max( {\frac{\sum\limits_{i = x}^{x + {w/2}}{i( {i,y} )}}{w/2},T_{grad}} )}} & (8)\end{matrix}$

According to the maximum gradient threshold T_(grad), T_(l) and T_(r)may be calculated with reference to the position of the pixel.

By means of the formula (4), the edge image at the left side of thein-vehicle device (i.e., the first edge image) may be binarized toobtain the first binarized edge image. By means of the formula (5), theedge image at the right side of the in-vehicle device (i.e., the secondedge image) may be binarized to obtain the second binarized edge image.

Obviously, in practical applications, the first edge image and thesecond edge image may be binarized through other methods by thoseskilled in the art, which are not limited in the exemplary embodiment ofthe present disclosure.

The exemplary embodiment of the present disclosure can reduce theinfluence of illumination on feature point extraction by performing thebinarization process on the first edge image and the second edge image.

After the first binarized edge image and the second binarized edge imageare obtained, step 207 is performed.

Step 207: performing a row scanning for each of the first binarized edgeimage and the second binarized edge image, and obtaining a first laneline pixel feature point and a second lane line pixel feature point inrespective rows.

By performing the row scanning for each of the first binarized edgeimage and the second binarized edge image, i.e., processing each row ofpixels and each pixel in each row of the first binarized image and thesecond binarized image, a first feature point, i.e., a first lane linepixel feature point, may be obtained from the first binarized edgeimage, and a second feature point, i.e., a second lane line pixelfeature point, may be obtained from the second binarized edge image.

After the matched first lane line pixel feature point and second laneline pixel feature point in each row of the first binarized edge imageand the second binarized edge image are extracted, step 208 isperformed.

It should be understood that the above steps 205 to 207 correspond tothe step 102 described above, that is, the above steps 205 to 207 aresubdivided steps of the step 102.

Step 208: copying and saving the first lane line pixel feature point andthe second lane line pixel feature point into a new image to obtain alane line feature map when a distance between the first lane line pixelfeature point and the second lane line pixel feature point satisfies aset distance threshold.

When a distance between the matched first lane line pixel feature pointand second lane line pixel feature point satisfies a set distancethreshold, the pixel feature between the first feature point and thesecond feature point is also the lane line pixel feature. Thus, thefirst and second feature points satisfying the set distance thresholdare copied and saved to a new image to obtain a lane line feature map.

In an exemplary embodiment of the disclosure, the set distance thresholdmay be represented by a first threshold and a second threshold.Satisfying the set distance threshold means that the distance valuebetween the matched first lane line pixel feature point and second laneline pixel feature point is between the first threshold and the secondthreshold. The first threshold and the second threshold are setaccording to a width of a real lane line. In the image to be detected,the feature points of different positions are different in the widththresholds. The closer a lane line to the in-vehicle device and thelarger the width shown in the image, the greater the adopted widththreshold. That is, this step determines whether the distance valuebetween the matched first and second lane line pixel feature points isbetween a first threshold and a second threshold that are associatedwith positions of the first lane line pixel feature point and the secondlane line pixel feature point.

Specifically, the width threshold may be obtained in the followingmanner:

setting the lane line width to be w in the real coordinate system inwhich the in-vehicle device is located. Referring to FIG. 3b , aschematic view showing a lane line according to an exemplary embodimentof the present disclosure is shown. The field of view may be dividedinto two parts, i.e., an upper field and a lower field, i.e., a nearfield of view and a far field of view. Due to a perspective projectioneffect of the camera, lane lines with the same width in the real worldwill have a near-wide and far-narrow effect in the image. Therefore, thenear field of view and the far field of view are divided for the purposeof obtaining a more accurate lane line width in the image. Thecalculation process of the near field of view is: in calculation of thesecond threshold for the near field of view, assuming that there is alane line at point D, where the coordinate values of the left and rightedges thereof in the world coordinate system are (−w/2,0,0) and(w/2,0,0), respectively; and in calculation of the first threshold forthe near field of view, assuming that there is a lane line at point A,where the coordinate values of the left and right edges thereof in theworld coordinate system are (−u,v,0) and (−u+w/2,v,0), respectively. Thecalculation process of the far field of view is: in calculation of thesecond threshold for the far field of view, assuming that there is alane line at point 0, where the coordinate values of the left and rightedges thereof in the world coordinate system are (−w/2,v,0) and(w/2,v,0), respectively; and in calculation of the first threshold forthe far field of view, assuming that there is a lane line at point E,where the coordinate values of the left and right edges thereof in theworld coordinate system are (−u,2v,0) and (−u+w/2,2v,0), respectively;where u, v are set by the front lane line detection range, u is 7 m inthe left-right direction of the vehicle in the region of interest set inthe above example, and v is one-half of the furthest detection distance(e.g. 40 m/2).

After the first threshold and the second threshold are obtained, thefirst lane line pixel feature point and the second lane line pixelfeature point in the first binarized edge image and the second binarizededge image may be matched according to the first threshold and thesecond threshold. During the row scanning, the first lane line pixelfeature point and the second lane line pixel feature point form a pairof lane line feature edge points only when the distance between two laneline pixel feature points is between the first threshold and the secondthreshold. The pixels between the two points belong to the lane linefeatures, and the matchable left and right feature points (i.e., thedistance between the left and right feature points meet the lane linewidth requirement) are copied and saved into a new image to obtain thefinal lane line feature map.

The coordinate values of each edge point in the world coordinate systemmay converted into the image coordinate system as represented by theabove formula (1), or may be converted in other manners, which is notlimited by the exemplary embodiments of the present disclosure. Afterthe lane line feature map is obtained, step 209 is performed.

Step 209: searching for a superpixel feature from an edge position ofthe lane line feature map, and using a first found superpixel feature asa superpixel feature reference point.

In an exemplary embodiment of the present disclosure, after the finallane line feature map (i.e., pixel feature map) of the region ofinterest is obtained, the scanning and combining from bottom to top andfrom left to right may be performed based on the final lane line featuremap, and the first found uncombined feature point is taken as a newsuperpixel feature reference point.

The lane line feature map may be searched from bottom to top to use thefirst found superpixel feature as a superpixel feature reference point.Referring to FIG. 3c , a schematic view showing the searching of asuperpixel according to an exemplary embodiment of the presentdisclosure is shown. As shown in the left half of FIG. 3c , startingfrom the bottom of a map, a search is first performed from left toright, then from bottom to top, to find a feature point that is notcombined and searched in the map (corresponding to white pixel points inthe figure, i.e., the portion circled with dotted lines in the left halfof FIG. 3c ). With this pixel point as the reference point (i.e.,corresponding to the black region in the right half of FIG. 3c whichrepresents the first found superpixel feature, namely, this superpixelfeature is used as the superpixel feature reference point), step 210 isperformed.

Step 210: finding similar features to the superpixel feature referencepoint within a candidate range of the superpixel feature referencepoint.

After a superpixel feature reference point is determined, it is possibleto find out whether there are similar features in the candidate range ofthe superpixel feature reference point. In the present disclosure, a rowscanning method may be used to find out whether similar features arepresent. As shown in the right half of FIG. 3c , the black partrepresents a superpixel feature reference point, while the gray partrepresents a search range of the superpixel feature reference pointwhich is found for a similar feature. Then, step 211 is performed.

Step 211: combining the superpixel feature reference point with thefound similar features to generate the superpixel.

When similar features are found in the candidate range of the superpixelfeature reference point, the found similar features are combined intothe superpixel feature reference point to generate a superpixelcorresponding to the superpixel feature reference point, and then, step212 is performed.

It should be understood that the above steps 208 to 211 correspond tothe step 103 described above, that is, the above steps 208 to 211 aresubdivided steps of the step 103.

Step 212: performing a clustering process for the respective superpixelsto obtain a plurality of candidate lane lines.

In an exemplary embodiment of the present disclosure, superpixelsbelonging to the same lane line may be clustered by a clustering methodso that a plurality of candidate lane lines may be formed.

In practical applications, those skilled in the art may select aclustering method for clustering superpixels belonging to the same laneline according to actual needs, which is not limited herein by theexemplary embodiments of the present disclosure.

The process of clustering candidate lane lines is performed by theclustering method as follows:

firstly, defining a cluster sample set, i.e., a point set of superpixelsD=(x₁, x₂, x₃, x₄, x₅, . . . , x_(m)), a neighborhood parameter(∈,MinPts), and a sample distance metric formula:

d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) ·u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) ·u−b _(i)·u),

where d(u_(i), u_(j)) represents a distance between superpixels u, andrepresents a gradient direction angle of a top pixel point ti of thesuperpixel u θ_(mi) represents a gradient direction angle of a middlepixel point mi of the superpixel u_(i), θ_(bi) represents a gradientdirection angle of a bottom pixel point bi of the superpixel u_(i),θ_(tj) represents a gradient direction angle of a top pixel point tj ofthe superpixel u_(j), θ_(mj) represents a gradient direction angle of amiddle pixel point mj of the superpixel u_(j), θ_(bj) represents agradient direction angle of a bottom pixel point bj of the superpixelu_(j), α represents the weight of angle, β represents the weight ofdistance, α and β represent a preset fixed value, abs representscalculating an absolute value, t_(i)·u represents an abscissa of the toppixel point ti, m_(i)·u represents an abscissa of the middle pixel pointmi, b_(i)·u represents an abscissa of the bottom pixel point bi, t_(j)·urepresents an abscissa of the top pixel point tj, m_(i)·u represents anabscissa of the middle pixel point mj, and b_(j)·u represents anabscissa of the bottom pixel point bj.

The gradient direction of the superpixel in the exemplary embodiment ofthe present disclosure will be described in detail below with referenceto FIG. 3d . FIG. 3d is a schematic view showing a superpixel gradientdirection according to an exemplary embodiment of the presentdisclosure. As shown in FIG. 3d , top, middle, and bottom are pixelpoints at which the superpixel is at the top, the middle, and thebottom, respectively. The gradient direction of the top point refers toa direction of a connecting line from a pixel point at a middle positionin a next row of the top point to the top point in the superpixel; thegradient direction of the middle point refers to a direction of aconnecting line from a pixel point at a middle position in a next row ofthe middle point to the middle point in the superpixel; and the gradientdirection of the bottom point refers to a direction of a connecting linefrom a pixel point at a middle position in a previous row of the middlepoint to the bottom point in the superpixel.

The specific process may refer to the following steps:

(1) initializing a core object set Ω=ϕ, initializing the number ofclustered lane lines K=0, initializing an unvisited superpixel sampleset F=D, and a lane lines division C=0; where C is a set;

(2) finding the core objects of all superpixels for each of thesuperpixel points j=1, 2, . . . , m according to steps a)-b) below:

a) finding a ∈−neighborhood superpixel point subset N_(ϵ) (u_(j)) forthe superpixel point u_(j) according to the distance metric formula;

b) adding the superpixel point u_(j) to the core object set Ω=Ω∪{u_(j)}if the number of superpixel point subsets satisfies|N_(ϵ)(u_(j))|≥Minpts;

(3) ending the algorithm if the core object Ω=ϕ, otherwise proceeding tostep (4);

(4) randomly selecting a core object o in the core object set Q,initializing a current cluster core object queue Ω_(cur)={o}, (in thisdisclosure, each candidate lane line corresponds to a cluster),initializing a category number, k=k+1, initializing a current clustersample set C_(k)={o}, and updating an unvisited sample set Γ=Γ−{o}.

(5) completing generation of the current cluster C_(k) if the currentcluster core object queue Ω_(cur)=ϕ, updating a cluster division C={C₁,C₂, C₃, . . . , C_(k)}, updating the core object set Ω=Ω−C_(k), andproceeding to step (3);

(6) taking a core object o′ out of the current cluster core object queueΩ_(cur), finding all E neighborhood sample subsets N_(∈)(o′),Δ=N_(∈)(o′)∩Γ, through a neighborhood distance threshold ∈, updating thecurrent cluster sample set C_(k)=C_(k)∪Δ, updating the unvisited sampleset Γ=Γ−Δ, and proceeding to step (5);

(7) outputting the cluster division result C=C={C₁, C₂, C₃, . . . ,C_(k)}, and using the cluster division result as a candidate lane line.

Obviously, in practical applications, those skilled in the art may adoptother clustering methods for clustering superpixels belonging to thesame lane line, which is not limited herein by the exemplary embodimentsof the present disclosure.

Step 213: calculating a length value of each of the candidate lanelines.

After a plurality of candidate lane lines are obtained, the lengthvalues of the candidate lane lines may be calculated.

Step 214: performing a quadratic curve fitting for each of the candidatelane lines whose length value is greater than a set threshold to obtaina target lane line.

The set threshold is set according to the actual situation of the road,which is not limited in the present disclosure.

In the exemplary embodiment of the present disclosure, the length valueof each candidate lane line is compared with the set threshold, thusreducing interference with other factors on road and the probability offalse detection of the lane line.

After the length value is compared with the set threshold, a quadraticcurve fitting (i.e., quadratic equation fitting) may be performed foreach candidate lane line whose length value is greater than the setthreshold, so as to form a curve expression of the target lane line,thereby obtaining the target lane line.

In practical applications, the lane line includes a straight line and acurve. Using the quadratic equation can better fit the curve expressionform of the target lane line, thereby obtaining the target lane line.

It should be understood that the above steps 212 to 214 correspond tothe step 104 described above, that is, the above steps 212 to 214 aresubdivided steps of the step 104.

The lane line detection method provided in the exemplary embodiment ofthe present disclosure may be used for an in-vehicle device, and maydetermine a region of interest in an image to be detected, extract eachlane line pixel feature in the region of interest, combine similar laneline pixel features to generate a superpixel corresponding to thecombined lane line pixel features, and perform a clustering and fittingprocess for each superpixel to obtain a target lane line. The exemplaryembodiment of the present disclosure generates the target lane linebased on superpixels, which does not require any assumption about laneline and road models, and does not rely on the assumption of parallellane lines; it may work robustly in an urban environment withoutinterference with a front vehicle, thereby reducing a probability ofmissed or false detection during the lane line detection.

FIG. 4 is a structural schematic view showing a lane line detectionapparatus according to an exemplary embodiment of the disclosure. Asshown in FIG. 4, the lane line detection apparatus may specificallyinclude:

a region of interest determining component 310 configured to determine aregion of interest in an image to be detected; a pixel featureextracting component 320 configured to extract lane line pixel featuresin the region of interest; a superpixel generating component 330configured to combine similar lane line pixel features to generate asuperpixel corresponding to the combined lane line pixel features; and atarget lane line obtaining component 340 configured to perform aclustering and fitting process for respective superpixels to obtain atarget lane line.

In an exemplary embodiment of the disclosure, the region of interestdetermining component 310 includes: a processing region settingsub-component configured to set a lane line processing region around thein-vehicle device; a coordinate value determining sub-componentconfigured to determine coordinate values of a midpoint on each ofboundary lines of the lane line processing region in a real coordinatesystem in which the in-vehicle device is located; an image coordinatevalue obtaining sub-component configured to convert each of thecoordinate values into a corresponding image coordinate value in animage coordinate system corresponding to the image to be detected; and aregion of interest determining sub-component configured to determine theregion of interest in the image to be detected according to therespective image coordinate values.

In an exemplary embodiment of the disclosure, the pixel featureextracting component 320 includes: an edge image selecting sub-componentconfigured to select a first edge image and a second edge image in theregion of interest; a binarization processing sub-component configuredto perform a binarization process for each of the first edge image andthe second edge image to obtain a first binarized edge image and asecond binarized edge image; and a scan processing sub-componentconfigured to perform a row scanning for each of the first binarizededge image and the second binarized edge image, and obtain a first laneline pixel feature point and a second lane line pixel feature point inrespective rows.

In an exemplary embodiment of the disclosure, the superpixel generatingcomponent 330 includes: a lane line feature map obtaining sub-componentconfigured to copy and save the first lane line pixel feature point andthe second lane line pixel feature point into a new image to obtain alane line feature map when a distance between the first lane line pixelfeature point and the second lane line pixel feature point satisfies aset distance threshold; a reference point selecting sub-componentconfigured to search for a superpixel feature from an edge position ofthe lane line feature map, and use a first found superpixel feature as asuperpixel feature reference point; a finding sub-component configuredto find similar features to the superpixel feature reference pointwithin a candidate range of the superpixel feature reference point; anda superpixel generating sub-component configured to combine thesuperpixel feature reference point with the found similar features togenerate the superpixel.

In an exemplary embodiment of the disclosure, the target lane lineobtaining component 340 includes: a clustering and fitting processingsub-component configured to perform a clustering process for therespective superpixels to obtain a plurality of candidate lane lines; alength value calculating sub-component configured to calculate a lengthvalue of each of the candidate lane lines; and a target lane lineobtaining sub-component configured to perform a quadratic curve fittingfor each of the candidate lane lines whose length value is greater thana set threshold to obtain a target lane line.

In an exemplary embodiment of the disclosure, the binarizationprocessing sub-component is configured to compare pixel values of thefirst edge image and the second edge image to a pixel threshold which isassociated with positions and/or vertical gradient of the pixels in thefirst edge image and the second edge image.

In an exemplary embodiment of the disclosure, the lane line feature mapobtaining sub-component is configured to determine whether a distancevalue between the matched first and second lane line pixel featurepoints is between a first threshold and a second threshold that areassociated with positions of the first lane line pixel feature point andthe second lane line pixel feature point.

In an exemplary embodiment of the disclosure, the clustering and fittingprocessing sub-component defines the following sample distance metricformula to perform the clustering and fitting process:

d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) u−b _(i) ·u),

where d(u_(i), u_(j)) represents a distance between superpixels u_(i)and u_(j), θ_(ti) represents a gradient direction angle of a top pixelpoint ti of the superpixel u_(i), θ_(mi) represents a gradient directionangle of a middle pixel point mi of the superpixel u_(i), θ_(bi)represents a gradient direction angle of a bottom pixel point bi of thesuperpixel u_(i), θ_(tj) represents a gradient direction angle of a toppixel point tj of the superpixel u_(j), θ_(mj) represents a gradientdirection angle of a middle pixel point mj of the superpixel u_(j),θ_(bj) represents a gradient direction angle of a bottom pixel point bjof the superpixel u_(j), α represents the weight of angle, β representsthe weight of distance, α and β represent a preset fixed value, absrepresents calculating an absolute value, t_(i)·u represents an abscissaof the top pixel point ti, m_(i)·u represents an abscissa of the middlepixel point mi, b_(i)·u represents an abscissa of the bottom pixel pointbi, t_(i)·u represents an abscissa of the top pixel point tj, m_(j)·urepresents an abscissa of the middle pixel point mj, and b_(j)·urepresents an abscissa of the bottom pixel point bj.

In an exemplary embodiment of the present disclosure, the region ofinterest determining component 310, the pixel feature extractingcomponent 320, the superpixel generating component 330, the target laneline obtaining component 340, and subcomponents thereof may beimplemented by a DSP chip or an embedded chip, or any other device orprocessing circuit capable of data processing.

It should be understood that the lane line detection apparatus providedby the present disclosure corresponds to the lane line detection methodprovided by the present disclosure. For description about other aspectsof the lane line detection apparatus, reference may be made to the abovedescription about the lane line detection method, which is not repeatedherein.

The lane line detection apparatus provided in the exemplary embodimentof the present disclosure may determine a region of interest in an imageto be detected, extract each lane line pixel feature in the region ofinterest, combine similar lane line pixel features to generate asuperpixel corresponding to the combined lane line pixel features, andperform a clustering and fitting process for each superpixel to obtain atarget lane line. The exemplary embodiment of the present disclosuregenerates the target lane line based on superpixels, which does notrequire any assumption about lane line and road models, and does notrely on the assumption of parallel lane lines; it may work robustly inan urban environment without interference with a front vehicle, therebyreducing a probability of missed or false detection during the lane linedetection.

For the sake of brevity, the foregoing method embodiments are alldescribed as a series of combinations of actions, but those skilled inthe art should understand that the present disclosure is not limited bythe described order of actions, because according to the presentdisclosure, some steps may be performed in other orders or at the sametime. In addition, those skilled in the art should also understand thatthe embodiments described in the description are all preferredembodiments, and the acts and components involved are not necessarilyrequired by the present disclosure.

The various embodiments in the present description are all described ina progressive manner, and each embodiment focuses on differences fromother embodiments, and thus the same or similar parts between thevarious embodiments may be referred to each other.

Finally, it should also be noted that, in this context, relational termssuch as first and second, are used merely to distinguish one entity oroperation from another without necessarily requiring or implying thatthere is any such actual relationship or order between such entities oroperations. Moreover, the term “comprise,” “comprising” or any variantthereof means to be non-exclusive so that a process, method, item ordevice including a series of elements includes not only said elements,but also other elements not explicitly listed, or inherent elements ofsuch processes, methods, items or devices. In the absence of morelimitations, an element defined by “includes a . . . ” do not excludethe existence of additional identical elements in the process, method,item or device including the element.

The above is a detailed description of the lane line detection methodand the lane line detection apparatus provided by the presentdisclosure. The principles and implementations of the present disclosureare set forth through exemplary embodiments herein, and the descriptionof the exemplary embodiments is only to assist in understanding themethod of the present disclosure and its core ideas. At the same time,for those ordinary skilled in the art, there will be changes in thespecific embodiments and application scopes based on the ideas of thepresent disclosure. In conclusion, the content of the description shouldnot be construed as limiting the disclosure.

What is claimed is:
 1. A lane line detection method applicable for anin-vehicle device and comprising: determining a region of interest in animage to be detected; extracting lane line pixel features in the regionof interest; combining similar lane line pixel features to generate asuperpixel corresponding to the combined lane line pixel features; andperforming a clustering and fitting process for respective superpixelsto obtain a target lane line.
 2. The method according to claim 1,wherein the step of determining the region of interest in the image tobe detected comprises: setting a lane line processing region around thein-vehicle device; determining coordinate values of a midpoint on eachof boundary lines of the lane line processing region in a realcoordinate system in which the in-vehicle device is located; convertingeach of the coordinate values into a corresponding image coordinatevalue in an image coordinate system corresponding to the image to bedetected; and determining the region of interest in the image to bedetected according to the respective image coordinate values.
 3. Themethod according to claim 1, wherein the step of extracting the laneline pixel features in the region of interest comprises: selecting afirst edge image and a second edge image in the region of interest;performing a binarization process for each of the first edge image andthe second edge image to obtain a first binarized edge image and asecond binarized edge image; and performing a row scanning for each ofthe first binarized edge image and the second binarized edge image, andobtaining a first lane line pixel feature point and a second lane linepixel feature point in respective rows.
 4. The method according to claim3, wherein the step of combining the similar lane line pixel features togenerate the superpixel corresponding to the combined lane line pixelfeatures comprises: copying and saving the first lane line pixel featurepoint and the second lane line pixel feature point into a new image toobtain a lane line feature map when a distance between the first laneline pixel feature point and the second lane line pixel feature pointsatisfies a set distance threshold; searching for a superpixel featurefrom an edge position of the lane line feature map, and using a firstfound superpixel feature as a superpixel feature reference point;finding similar features to the superpixel feature reference pointwithin a candidate range of the superpixel feature reference point; andcombining the superpixel feature reference point with the found similarfeatures to generate the superpixel.
 5. The method according to claim 1,wherein the step of performing the clustering and fitting process forthe respective superpixels to obtain the target lane line comprises:performing a clustering process for the respective superpixels to obtaina plurality of candidate lane lines; calculating a length value of eachof the candidate lane lines; and performing a quadratic curve fittingfor each of the candidate lane lines whose length value is greater thana set threshold to obtain a target lane line.
 6. The method according toclaim 3, wherein the binarization process includes comparing pixelvalues of the first edge image and the second edge image to a pixelthreshold which is associated with positions of the pixels in the firstedge image and the second edge image.
 7. The method according to claim6, wherein the pixel threshold is also associated with a verticalgradient of the pixels in the first edge image and the second edgeimage.
 8. The method according to claim 4, wherein it is determinedwhether a distance value between the matched first and second lane linepixel feature points is between a first threshold and a second thresholdthat are associated with positions of the first lane line pixel featurepoint and the second lane line pixel feature point.
 9. The methodaccording to claim 5, wherein the following sample distance metricformula is defined to perform the clustering and fitting process:d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) ·u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) ·u−b _(j)·u), where d(u_(i), u_(j)) represents a distance between superpixelsu_(i) and u_(j), θ_(ti) represents a gradient direction angle of a toppixel point ti of the superpixel u_(i), θ_(mi) represents a gradientdirection angle of a middle pixel point mi of the superpixel u_(i),θ_(bi) represents a gradient direction angle of a bottom pixel point biof the superpixel u_(i), θ_(tj) represents a gradient direction angle ofa top pixel point tj of the superpixel u_(j), θ_(mj) represents agradient direction angle of a middle pixel point mj of the superpixelu_(j), θ_(bi) represents a gradient direction angle of a bottom pixelpoint bj of the superpixel u_(j), α represents the weight of angle, βrepresents the weight of distance, α and β represent a preset fixedvalue, abs represents calculating an absolute value, t_(i)·u representsan abscissa of the top pixel point ti, m_(i)·u represents an abscissa ofthe middle pixel point mi, b_(i)·u represents an abscissa of the bottompixel point bi, t_(i)·u represents an abscissa of the top pixel pointtj, m_(i)·u represents an abscissa of the middle pixel point mj, andb_(j)·u represents an abscissa of the bottom pixel point bj.
 10. A laneline detection apparatus, comprising: a region of interest determiningcomponent configured to determine a region of interest in an image to bedetected; a pixel feature extracting component configured to extractlane line pixel features in the region of interest; a superpixelgenerating component configured to combine similar lane line pixelfeatures to generate a superpixel corresponding to the combined laneline pixel features; and a target lane line obtaining componentconfigured to perform a clustering and fitting process for respectivesuperpixels to obtain a target lane line.
 11. The apparatus according toclaim 10, wherein the region of interest determining componentcomprises: a processing region setting sub-component configured to set alane line processing region around the in-vehicle device; a coordinatevalue determining sub-component configured to determine coordinatevalues of a midpoint on each of boundary lines of the lane lineprocessing region in a real coordinate system in which the in-vehicledevice is located; an image coordinate value obtaining sub-componentconfigured to convert each of the coordinate values into a correspondingimage coordinate value in an image coordinate system corresponding tothe image to be detected; and a region of interest determiningsub-component configured to determine the region of interest in theimage to be detected according to the respective image coordinatevalues.
 12. The apparatus according to claim 10, wherein the pixelfeature extracting component includes: an edge image selectingsub-component configured to select a first edge image and a second edgeimage in the region of interest; a binarization processing sub-componentconfigured to perform a binarization process for each of the first edgeimage and the second edge image to obtain a first binarized edge imageand a second binarized edge image; and a scan processing sub-componentconfigured to perform a row scanning for each of the first binarizededge image and the second binarized edge image, and obtain a first laneline pixel feature point and a second lane line pixel feature point inrespective rows.
 13. The apparatus according to claim 12, wherein thesuperpixel generating component comprises: a lane line feature mapobtaining sub-component configured to copy and save the first lane linepixel feature point and the second lane line pixel feature point into anew image to obtain a lane line feature map when a distance between thefirst lane line pixel feature point and the second lane line pixelfeature point satisfies a set distance threshold; a reference pointselecting sub-component configured to search for a superpixel featurefrom an edge position of the lane line feature map, and use a firstfound superpixel feature as a superpixel feature reference point; afinding sub-component configured to find similar features to thesuperpixel feature reference point within a candidate range of thesuperpixel feature reference point; and a superpixel generatingsub-component configured to combine the superpixel feature referencepoint with the found similar features to generate the superpixel. 14.The apparatus according to claim 10, wherein the target lane lineobtaining component comprises: a clustering and fitting processingsub-component configured to perform a clustering process for therespective superpixels to obtain a plurality of candidate lane lines; alength value calculating sub-component configured to calculate a lengthvalue of each of the candidate lane lines; and a target lane lineobtaining sub-component configured to perform a quadratic curve fittingfor each of the candidate lane lines whose length value is greater thana set threshold to obtain a target lane line.
 15. The apparatusaccording to claim 12, wherein the binarization processing sub-componentis configured to compare pixel values of the first edge image and thesecond edge image to a pixel threshold which is associated withpositions of the pixels in the first edge image and the second edgeimage.
 16. The apparatus according to claim 15, wherein the pixelthreshold is also associated with a vertical gradient of the pixels inthe first edge image and the second edge image.
 17. The apparatusaccording to claim 13, wherein the lane line feature map obtainingsub-component is configured to determine whether a distance valuebetween the matched first and second lane line pixel feature points isbetween a first threshold and a second threshold that are associatedwith positions of the first lane line pixel feature point and the secondlane line pixel feature point.
 18. The apparatus according to claim 14,wherein the clustering and fitting processing sub-component defines thefollowing sample distance metric formula to perform the clustering andfitting process:d(u _(i) ,u_(j))=α·abs(θ_(ti)−θ_(tj))+α·abs(θ_(mi)−θ_(mj))+α·abs(θ_(bi)−θ_(bj))+β·abs(t_(i) ·u−t _(j) ·u)+β·abs(m _(i) ·u−m _(j) ·u)+β·abs(b _(i) ·u−b _(j)·u), where d(u_(i), u_(j)) represents a distance between superpixelsu_(i) and u_(j), θ_(ti) represents a gradient direction angle of a toppixel point ti of the superpixel u_(i), θ_(mi) represents a gradientdirection angle of a middle pixel point mi of the superpixel u_(i),θ_(bi) represents a gradient direction angle of a bottom pixel point biof the superpixel u_(i), θ_(tj) represents a gradient direction angle ofa top pixel point tj of the superpixel u_(j), θ_(mj) represents agradient direction angle of a middle pixel point mj of the superpixelu_(j), θ_(bj) represents a gradient direction angle of a bottom pixelpoint bj of the superpixel u_(j), α represents the weight of angle, βrepresents the weight of distance, α and β represent a preset fixedvalue, abs represents calculating an absolute value, t_(j)·u representsan abscissa of the top pixel point ti, m_(i)·u represents an abscissa ofthe middle pixel point mi, b_(i)·u represents an abscissa of the bottompixel point bi, t_(i)·u represents an abscissa of the top pixel pointtj, m_(j)·u represents an abscissa of the middle pixel point mj, andb_(j)·u represents an abscissa of the bottom pixel point bj.